fix: use aws eks get-token for kubectl auth#1590
Conversation
| description = "Override the default name used for items kubeconfig." | ||
| type = string | ||
| default = "" | ||
| default = null |
There was a problem hiding this comment.
Could you clarify, please, why is it required?
There was a problem hiding this comment.
There was a problem hiding this comment.
actually coalesce works with both "" and null, BUT it is almost always preferable to use null than empty string to indicate "no value set".
There was a problem hiding this comment.
actually coalesce works with both "" and null
yes but it will give different results (from terraform console):
> coalescelist([""], ["c", "d"])
[
"",
]
> coalescelist([], ["c", "d"])
[
"c",
"d",
]
There was a problem hiding this comment.
ahh, but here is just normal string
There was a problem hiding this comment.
yes the function being discussed is coalesce not coalescelist
| @@ -219,7 +219,7 @@ variable "kubeconfig_aws_authenticator_env_variables" { | |||
| variable "kubeconfig_name" { | |||
There was a problem hiding this comment.
would you update kubeconfig_aws_authenticator_command default value as well?
|
@antonbabenko @daroga0002 @schollii hi folks) @schollii could you post |
I assume it can be any, e.g. examples/launch_templates |
| description = "Command to use to fetch AWS EKS credentials. Defaults to aws CLI (will use eks command)." | ||
| type = string | ||
| default = "aws-iam-authenticator" | ||
| default = null |
There was a problem hiding this comment.
| default = null | |
| default = "aws" |
And remove coalesce() where this variable is used. Right?
There was a problem hiding this comment.
@schollii do you will be able to change it and then I will make testing
|
@lisfo4ka ok will report back asap |
timblaktu
left a comment
There was a problem hiding this comment.
Changes look good to me. This will be a big improvement. All external examples of first steps configuring kubectl to auth/connect to an EKS cluster use the aws eks update-kubeconfig approach, which uses the get-token approach, so aligning this Terraform module will prevent new users from being confused why they're so different (and prevent them from having to install aws-iam-authenticator.)
|
I think we should include this in a breaking change and drop all support for the legacy iam-authenticator approach - thoughts @daroga0002 ? |
|
I tried to search what are benefits of using aws-iam-authenticator and I dont see any, maybe somebody from community will be able to put some arguments here. From my side I think we can:
|
|
It's a good idea but I think it's taking this ticket beyond original scope, a separate ticket would be better so we can close this asap. |
|
Getting this over the finish line would be rad. When I was first getting started, trying to find this extra tool (and figure out if |
@schollii can you adjust comments #1590 (comment) and then we will merge it to v17.* version Work about redesign we will cover in other PR for v18* milestone |
|
@daroga0002 not sure what you mean, clicking that link in your post just gets me to the top of the PR |
|
open comments from antonbabenko |
|
@daroga0002 I think we should have this one merged (after outstanding code changes got merged) and release a minor release in I am not knowledgeable enough to suggest dropping part of the functionality since it already works. I think we can reevaluate it as a part of the breaking changes we are going to have in v18 but not in this PR. |
Yes this is what I am suggesting, now we simply extend to allow feature in v17 and in v18 we will drop legacy approach (as that will be bigger breaking change release so migration will be not so fast probably). I will duplicate this PR and make fixes on my branch, test and open PR as I cannot edit this. |
|
Folks, I'd really like to deliver this change to the v17, so I've created a new PR with proper testing. Please, take a look at #1699 |
|
This PR has been automatically marked as stale because it has been open 30 days |
|
This PR was automatically closed because of stale in 10 days |
|
This issue has been resolved in version 18.0.0 🎉 |
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
PR o'clock
Description
Fixes #957
Use aws eks get-token instead of aws iam authenticator
Checklist